package com.scs.application.modules.base.controller;

import com.scs.application.core.mvc.controller.CrudController;
import com.scs.application.modules.base.entity.ReagentTeamUser;
import com.scs.application.modules.base.service.ReagentTeamUserService;
import com.scs.application.modules.sys.entity.User;
import com.scs.application.modules.sys.model.RestResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 试剂组人员 前端控制器
 * </p>
 */
@RestController
@RequestMapping("/base/reagent_team_user")
public class ReagentTeamUserController extends CrudController<ReagentTeamUserService, ReagentTeamUser>{

    @Resource
    private ReagentTeamUserService teamUserService;

    /**
     * 保存或更新试剂组人员信息
     */
    @RequestMapping(value = "/saveUser", method = RequestMethod.POST)
    public RestResult saveUser(@RequestBody List<User> users, @RequestParam String reagentTeamId) {
        return RestResult.ok("保存成功", teamUserService.saveUser(users, reagentTeamId));
    }

}
